<template>
  <div>
    App
    <Child>
      <template #header>
        <p>{{count}}</p>
      </template>
      <button @click="appHandle">app按钮</button>
      <h2>默认插槽</h2>
      <template #footer={msg}>
        <p>{{count}}</p>
        <p>{{msg}}</p>
      </template>
    </Child>
  </div>
</template>

<script>
  import Child from "./Child";
  export default {
    name: "App",
    components:{
      Child
    },
    data() {
      return {
        count:0
      }
    },
    methods:{
      appHandle(){
        this.count+=2
      }
    }
  }
</script>

<style scoped>

</style>